home *** CD-ROM | disk | FTP | other *** search
/ PC Elektro 3 / PC-Elektro-3-cd1.bin / DesignWorks Professional Schematic Capture / DesignWorks4Setup.exe / Main / Xilinx-XNF.RFM < prev    next >
Encoding:
Text File  |  2004-10-16  |  8.9 KB  |  274 lines

  1. {
  2.     DesignWorks Report Form for Xilinx 4000
  3.     Copyright 1990-1995 Capilano Computing Systems
  4.  
  5.     Modifications:
  6.  
  7.     July 18, 1995   C. Dewhurst     Created
  8.     May 31, 1996    C. Dewhurst     Omit unused pins, e.g. for CLB
  9.     June 21, 1996   C. Dewhurst     Assign names to unnamed signals
  10.     June 26, 1996   D. Gamble       Included ports so they would be counted as net connections.
  11.     July 29, 1996   C. Dewhurst     Use DWVERSION for program version
  12. }
  13. $NOTES
  14. This report form produces a XNF netlist for a Xilinx
  15. 4000 design.
  16.  
  17. Limitations:
  18.  
  19.   This report form must be run using the Report
  20.   (Smash/Xilinx) tool.
  21.  
  22.  
  23. Attribute    Where    Description
  24.  
  25.   see the Xilinx Design Kit documentation for a complete
  26.   list of the attributes required.
  27.  
  28.  
  29.  
  30. *** IMPORTANT NOTE ***
  31.  
  32. This netlist script is provided with DesignWorks on an "as is" basis with no guarantee that it will work in any particular environment.  Capilano Computing has no control over the file formats that may be used by these systems.  These scripts have generally been created and tested in conjunction with DesignWorks users and were developed for use with a specific version of the target system.  The third party developer may change formats at any time, and we do not have the resources to track every version of every system on the market.
  33.  
  34. If this script does not appear to generate the format required for your system, we are happy to assist customers in generating the appropriate format.  Please contact us at tech@capilano.com and provide a sample netlist and as much information as you can about the required format.
  35. $END
  36. {
  37.    The following block is here to catch any attempt to use an old
  38.    Report generator.  This is ignored by XReport and Scripter.
  39. }
  40. $DEFINEBLOCK(OldReport)
  41. $CHECK(This report format requires the XReport tool or DesignWorks 4.0) $PURE $PHYSICAL $FLAT
  42. $END
  43. {
  44.   The following table defines the type names of i/o pads
  45.   and their corresponding pin type for use in EXT records.
  46. }
  47. $DEFINEBLOCK(PadTrans)
  48. ipad    I
  49. opad    O
  50. iopad    B
  51. upad    U
  52. $END
  53. {
  54.   The following table defines the type names of devices
  55.   that should NOT be listed in SYM records.  This includes
  56.   I/O pads and various special symbols.
  57.   7/29/96 CD Removed XC4*.  Now done by checking for X_PART.
  58. }
  59. $DEFINEBLOCK(NoSYMList)
  60. ipad
  61. opad
  62. iopad
  63. upad
  64. TIMESPEC
  65. TIMEGRP
  66. $END
  67. {
  68.   Define the output formats for pin parameters.
  69.   The first item on each line is the field name,
  70.   the second item is the match value, the last item
  71.   is the report string to interpret if the given field
  72.   matches the given value.
  73.  
  74.   Note that table items are delimited by tabs, so the column
  75.   alignment may not be what it seems, depending on the editor
  76.   you use to look at it!
  77. }
  78. $DEFINEBLOCK(PINParams)
  79. &Invert.Pin    ,INV
  80. &X_PIN_PARAM    ,&X_PIN_PARAM
  81. &X_PIN_TNM    ,TNM=&X_PIN_TNM
  82. &X_PIN_TS    ,&X_PIN_TS
  83. $END
  84. {
  85.   Note regarding bus names: We want to insert the name of
  86.   the enclosing bus in front of any signal name, but some of
  87.   our libraries had busses named things like "A[0:15]", so
  88.   we have to do the following weirdness with regular expressions
  89.   to extract the reasonable characters from the bus name.
  90. }
  91. $DEFINEBLOCK(BussedSigName)
  92. $BUSNAME    $IF($REGEXP(([A-Za-z0-9_$\-]+).*, $BUSNAME))&1$END<$SIGNAME>    $SIGNAME
  93. $END
  94. {
  95.   Define parameters for a SYM line.  See the format notes above.
  96.   For now, all pad, CLB and regular symbol attributes have been
  97.   lumped together.  We can do more error checking if we split
  98.   them out.
  99. }
  100. $DEFINEBLOCK(SYMParams)
  101. &X_LIBVER    ,LIBVER=&X_LIBVER
  102. &X_INIT    ,INIT=&X_INIT
  103. &Depth    ,FILE=$TYPENAME.xnf
  104. &X_SYM_PARAM    ,&X_SYM_PARAM
  105. &X_BLKNM    ,BLKNM=&X_BLKNM
  106. &X_HBLKNM    ,HBLKNM=&X_HBLKNM
  107. &X_LOC    ,LOC=&X_LOC
  108. &X_LOC_NOT    ,LOC<>&X_LOC_NOT
  109. &X_TNM    ,TNM=&X_TNM
  110. &X_CYMODE    ,CYMODE=&X_CYMODE
  111. &X_DEF    ,DEF=&X_DEF
  112. &X_DIVIDE1    ,DIVIDE1=&X_DIVIDE1
  113. &X_DIVIDE2    ,DIVIDE2=&X_DIVIDE2
  114. &X_EQN    ,EQN=&X_EQN
  115. &X_MAP    ,MAP=&X_MAP
  116. &X_TS    ,&X_TS
  117. &X_HU_SET    ,HU_SET=&X_HU_SET
  118. &X_RLOC    ,RLOC=&X_RLOC
  119. &X_RLOC_ORIGIN    ,RLOC_ORIGIN=&X_RLOC_ORIGIN
  120. &X_RLOC_RANGE    ,RLOC_RANGE=&X_RLOC_RANGE
  121. &X_U_SET    ,U_SET=&X_U_SET
  122. &X_USE_RLOC    ,USE_RLOC=&X_USE_RLOC
  123. &X_BASE    $NEWLINE\CFG,BASE &X_BASE
  124. &X_CONFIG    $NEWLINE\CFG,CONFIG &X_CONFIG
  125. &X_EQUATE_F    $NEWLINE\CFG,EQUATE F = &X_EQUATE_F
  126. &X_EQUATE_G    $NEWLINE\CFG,EQUATE G = &X_EQUATE_G
  127. $END
  128. {
  129.   The following block defines a complete XNF file.  It is used
  130.   once to write the top circuit and once for the internal circuits.
  131. }
  132. $DEFINEBLOCK(XNFBody)
  133. {
  134.   Check for any non-XC4000 symbols
  135. }
  136. $FIND $DEVICES $NOT &X_FAMILY(XC4000) &X_FAMILY(XC*)
  137. $CHECK(Warning: Design contains non-XC4000 symbols.  This report form is intended for XC4000 designs only!) $DEVICES
  138. {
  139.   Check for duplicate LOC parameters
  140. }
  141. $FIND $DEVICES &X_LOC
  142. $SORT $DEVICES &X_LOC
  143. $COMBDEVSON
  144. $FIND $NOCLEAR $DEVICES $COUNT(2)
  145. $CHECK(Warning: Duplicate LOC parameters in devices!) $DEVICES
  146. $COMBDEVSOFF
  147. {
  148.   Define the 4 billion names of Power and Ground
  149. }
  150. PWR,1,VCC,Vcc,Plus5V,Power,POWER
  151. PWR,0,GND,Gnd,Ground,GROUND
  152. $DEFINEBLOCK(PowerSignals)
  153. VCC
  154. Vcc
  155. Plus5V
  156. Power
  157. POWER
  158. GND
  159. Gnd
  160. Ground
  161. GROUND
  162. $END
  163. {
  164.   List any signals with parameters specified.  See the comments above about
  165.   inserting the bus name in front of the signal name.
  166. }
  167. $FIND $SIGNALS &X_SIG_PARAM
  168. $SIGNALS\SIG,$TABLE(BussedSigName),&X_SIG_PARAM
  169. {
  170.   Locate and list regular devices.
  171.   5/31/96 CD - Note the funny order here.  We want to exclude things that have only one pin connection
  172.   so that we filter out unused pins.  However, we have to include I/O ports in the count,
  173.   even though they are not listed as devices in this listing.  Therefore, we have to find
  174.   all devices, find signals based on the pin count, then find only the devices we want to list.
  175.   6/26/96 DJG - Included ports they would be counted as net connections.  Then excluded them
  176.   so that they didn't netlist.
  177. }
  178. $INCLUDEPORTSON{ 6/26/96 DJG }
  179. $FIND $DEVICES
  180. $FIND $SIGNALS $OR($NUMPINS(2),$VERIFY(PowerSignals, $SIGNAME)) { Exclude unused pins so optional items don't appear, e.g. CLB }
  181. $INCLUDEPORTSOFF{ 6/26/96 DJG }
  182. { List TIMESPEC and TIMEGRP devices separately because the format is a bit different }
  183. $FIND $DEVICES $OR($EQ(TIMESPEC, $TYPENAME),$EQ(TIMEGRP, $TYPENAME))
  184. $DEVICES\SYM,$DEVNAME,$TYPENAME,LIBVER=2.0.0$IF(&X_TS_DEFINE),&X_TS_DEFINE$END$IF(&X_SYM_PARAM),&X_SYM_PARAM$END$NEWLINE\END
  185. { 7/29/96 CD Exclude anything with an X_PART attribute }
  186. $FIND $DEVICES $NOT($OR($VERIFY(NoSYMList, $TYPENAME),&X_PART))
  187. $UNSELECTEDPINS $OFF $NOWARN
  188. $ASSIGNNAMES $SIGNALS $FORMAT(S00000) $REASSIGN        { 6/21/96 CD }
  189. $MAXITEMSPERLINE(1)
  190. $CONTSTART()
  191. $PINTYPEFORMAT I O $WARN T $NOWARN B $WARN ? ? ? ? $NOWARN { HIGH/LOW } O O $WARN ? ? ? ? ? ? ?
  192. $DEVPINFORMAT PIN,$PINNAME,$PINTYPE,$TABLE(BussedSigName)$TABLE(PINParams,\,)
  193. $PROGRESS $PERCENTON
  194. $DEVICES\SYM,$DEVNAME,$IF(&X_TYPE)&X_TYPE$ELSE$TYPENAME$END,SCHNM=$TYPENAME$TABLE(SYMParams)$NEWLINE$PINS$NEWLINE\END
  195. $PROGRESS $PERCENTOFF
  196. {
  197.   Find and put out I/O Pads
  198. }
  199. $FIND $DEVICES $VERIFY(PadTrans, $TYPENAME)
  200. $FIND $SIGNALS { Make sure we get them all }
  201. $DEVPINFORMAT $TABLE(BussedSigName)
  202. $DEVICES\EXT,$PINS,$MAP(PadTrans, $TYPENAME),,=DW_NAME=$DEVHIERNAME$IF(&X_LOC),LOC=&X_LOC$END$IF(&X_TNM),TNM=&X_TNM$END$IF(&X_SYM_PARAM),&X_SYM_PARAM$END
  203. {
  204.   End of the XNF definition
  205. }
  206. $END
  207. {
  208.   Define what we do for an internal circuit
  209. }
  210. $DEFINEBLOCK(InternalCct)
  211. $CREATEREPORT($TYPENAME.XNF) $CREATOR(ttxt)
  212. $LINETERMINATOR $DOS
  213. $PROGRESS(Creating $TYPENAME.XNF) $PERCENTOFF
  214. LCANET, 5
  215. PROG, DesignWorks, $DWVERSION, "Created at $TIME on $DATE from design $FILENAME"
  216. {
  217.   Write out the port interface
  218. }
  219. $INCLUDEPORTSON
  220. $FIND $DEVICES $ISPORT
  221. $SORT $DEVICES $DEVNAME
  222. $DEVPINFORMAT SIG, $TABLE(BussedSigName), PIN=$PORTNAME
  223. $MAXITEMSPERLINE(1)
  224. $CONTSTART()
  225. $DEVICES$PINS
  226. $INCLUDEPORTSOFF
  227. {
  228.   Write out the main XNF for the internal circuit
  229. }
  230. $INCLUDE $BLOCK(XNFBody)
  231. EOF
  232. $CLOSEREPORT
  233. $END
  234. {
  235.   Now we actually do something!
  236.   First, write out the internal circuits to their respective files.
  237. }
  238. $NULL($ALERT1(Output is being generated in directory $DESIGNNAME_))
  239. $CREATEDIRECTORY($DESIGNNAME)
  240. $PROGRESS $PERCENTOFF
  241. $HIERARCHY $PURE
  242. $FIND $DEVICES &Depth
  243. $SORT $DEVICES $TYPENAME
  244. $COMBDEVSON
  245. {
  246.   Turn off the line terminator for the listing of the internal circuits,
  247.   because it tries to put one at the end of each device line, but the
  248.   output report for the internal circuit has been closed and it will
  249.   try and create a new file for it.
  250. }
  251. $LINETERMINATOR $NONE
  252. $DEVICES$SINGLE$INTERNAL(InternalCct)
  253. $LINETERMINATOR $DOS
  254. $COMBDEVSOFF
  255. {
  256.   Create and write out the main XNF file
  257. }
  258. $PROGRESS(Creating $DESIGNNAME.XNF) $PERCENTOFF
  259. $CREATEREPORT($DESIGNNAME.XNF) $CREATOR(ttxt)
  260. $LINETERMINATOR $DOS
  261. $HIERARCHY $TOPCIRCUIT
  262. LCANET, 5
  263. { 7/29/96 CD Use DWVERSION }
  264. PROG, DesignWorks, $DWVERSION, "Created at $TIME on $DATE from design $FILENAME"
  265. {
  266.   Find a PART symbol
  267. }
  268. $FIND $DEVICES &X_PART
  269. $DEVICES\PART,&X_PART
  270. {
  271.   Do the main top-level XNF file
  272. }
  273. $INCLUDE $BLOCK(XNFBody)
  274. EOF